home *** CD-ROM | disk | FTP | other *** search
- Path: inforamp.net!usenet
- From: dsheuman@inforamp.net (Danny Heuman)
- Newsgroups: comp.lang.c
- Subject: String Arrays and string parsing
- Date: Mon, 19 Feb 1996 12:58:24 GMT
- Organization: InfoRamp Inc., Toronto, Ontario (416) 363-9100
- Message-ID: <31287278.789445@news.inforamp.net>
- Reply-To: dsheuman@inforamp.net
- NNTP-Posting-Host: ts10-03.tor.inforamp.net
- X-Newsreader: Forte Agent .99d/32.182
-
- I have day, month, and year as DDMMMYYYY and would like to parse it
- out in to DD, MMM, YYYY. I can parse the DD out by using
- strncpy(into1, from1, 2). I can parse the YYYY out by doing
- strcpy(into3, from1 + 5). How can I parse out the MMM? Can I use
- either of these functions that work above, strncpy or strcpy? If so,
- once parsed, do I have to attach an '\0' to the end of it to keep it
- as a character string?
-
- Thanks,
-
-
- Danny Heuman
- dsheuman@inforamp.net
-